<!DOCTYPE html>
<html>

<body>

    <head>
        <script src="./js/vue.js"></script>
    </head>
    <div id="app">
        <p id="msg">{{message}}</p>
        <button @click="change">更新</button>
    </div>
</body>

</html>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            message: 'Hello Vue!'
        },
        methods: {
            change() {
                this.message = 'This is new message!';
                this.$nextTick(() => {
                    console.log('use nextTick():', document.getElementById("msg").innerHTML);
                })
                console.log('not nextTick():', document.getElementById("msg").innerHTML);
            }
        }
    })

</script>